<template>
    <el-dropdown>
    <span class="el-dropdown-link">
        <el-avatar shape="square" :size="40" :src="squareUrl" />
    </span>
    <template #dropdown>
      <el-dropdown-menu>
        <!-- <el-dropdown-item>{{$t("add.homepage")}}</el-dropdown-item> -->
        <el-dropdown-item @click="logout">{{$t("add.leave")}}</el-dropdown-item>
      </el-dropdown-menu>
    </template>
  </el-dropdown>
</template>

<script setup lang="ts">
import { ref } from "vue";
import router from "../../router/index";

const squareUrl = ref('https://ts3.cn.mm.bing.net/th?id=OIP-C.tT0ZTSzrDP1bqreCwgrawgAAAA&w=250&h=250&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2')
const logout = ()=>{
    router.replace('/login')
}
</script>

<style lang="scss" scoped>

</style>